// 引入react
import React from 'react'
// 引入andt
import { Table, } from 'antd';
import Ycjl from '../Ycjl/Ycjl';
import Sqyc from '../sqyc/Sqyc'
import Del from '../Del/Del'
import Carxg from '../Carxg/Carxg';
import '../../../assets/css/Car/Biaoge.css'



// 创建表样式
const columns = [
    {
        title: '车辆编号',
        dataIndex: 'car_number',
        key: 'car_number',
    },
    {
        title: '所在位置',
        dataIndex: 'car_location',
        key: 'car_location',
    },
    {
        title: '车辆状态',
        dataIndex: 'car_Status',
        key: 'car_Status',
    },
    {
        title: '车辆型号',
        dataIndex: 'car_model',
        key: 'car_model',
    },
    {
        title: '车辆颜色',
        dataIndex: 'car_color',
        key: 'car_color',
    },
    {
        title: '车辆牌照',
        dataIndex: 'car_id',
        key: 'car_id',
    },
    {
        title: '出借时间',
        dataIndex: 'out_time',
        key: 'out_time',
    },
    {
        title: '归还时间',
        dataIndex: 'return_time',
        key: 'return_time',
    },
    {
        title: '用车人',
        dataIndex: 'car_user',
        key: 'car_user',
    },

    {
        title: '申请用车',
        key: 'sqyc',
        render: (_, record) => (
            <Sqyc ></Sqyc>
        ),
    },
    {
        title: '用车记录',
        key: 'ycjl',
        render: (_, record) => (
            <Ycjl msg={record.car_number}></Ycjl>
        ),
    },
    {
        title: '操作',
        key: 'xg',
        render: (_, record) => (
            <Carxg msg={record.car_number}></Carxg>
        ),
    },
    {
        title: '操作',
        key: 'sc',
        render: (_, record) => (
            <Del msg={record.car_number}></Del>
        ),
    },

];
//   创建表数据
const data = [
    {
        key: '1',
        car_number: '1',
        car_user: 'John Brown',
        car_id: '川32',
        car_location: '财务部',
        car_Status: '使用中',
        car_model: 'dadadsadw',
        car_color: '黑色',
        out_time: '2022-08-07',
        return_time: '2022-08-14'

    },
    {
        key: '2',
        car_number: '2',
        car_user: 'John Brown',
        car_id: '川32',
        car_location: '财务部',
        car_Status: '使用中',
        car_model: 'dadadsadw',
        car_color: '黑色',
        out_time: '2022-08-07',
        return_time: '2022-08-14'

    },
    {
        key: '3',
        car_number: '3',
        car_user: 'John Brown',
        car_id: '川32',
        car_location: '财务部',
        car_Status: '使用中',
        car_model: 'dadadsadw',
        car_color: '黑色',
        out_time: '2022-08-07',
        return_time: '2022-08-14'

    },
    {
        key: '4',
        car_number: '4',
        car_user: 'John Brown',
        car_id: '川32',
        car_location: '财务部',
        car_Status: '使用中',
        car_model: 'dadadsadw',
        car_color: '黑色',
        out_time: '2022-08-07',
        return_time: '2022-08-14'

    },

];

const Biaoge = () => {

    return (
        <div>
            <Table columns={columns} dataSource={data} />
        </div>
    )
}
export default Biaoge
